home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
PASWIZ20
/
JOYSTICK.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-11-04
|
2KB
|
67 lines
{ +----------------------------------------------------------------------+
| |
| PasWiz Copyright (c) 1990-1994 Thomas G. Hanlin III |
| |
+----------------------------------------------------------------------+
Joystick:
This unit provides joystick support via the BIOS routines. It will work on
all but the oldest machines. Joystick support was added to the BIOS around
the time of the ATs, circa 1985.
}
UNIT Joystick;
INTERFACE
FUNCTION ButtonA1: Boolean;
FUNCTION ButtonA2: Boolean;
FUNCTION ButtonB1: Boolean;
FUNCTION ButtonB2: Boolean;
PROCEDURE Buttons(VAR A1, A2, B1, B2: Boolean);
PROCEDURE Positions(VAR AX, AY, BX, BY: WORD);
{ --------------------------------------------------------------------------- }
IMPLEMENTATION
{$F+}
{ the below routines are in assembly language }
FUNCTION ButtonA1; external; { whether joystick A, button 1 is pressed }
FUNCTION ButtonA2; external; { whether joystick A, button 2 is pressed }
FUNCTION ButtonB1; external; { whether joystick B, button 1 is pressed }
FUNCTION ButtonB2; external; { whether joystick B, button 2 is pressed }
PROCEDURE Buttons(VAR A1, A2, B1, B2: Boolean); external; { all buttons }
PROCEDURE Positions(VAR AX, AY, BX, BY: WORD); external; { stick positions }
{$L JOYSTK}
{ ----------------------- initialization code --------------------------- }
BEGIN
END.